NAME=resnet101
MODEL=./out/$NAME/weights
SCORE=./out/$NAME/scores
OUT=./out/$NAME/scores
TSNE=./out/$NAME/tSNE
LOG=./out/$NAME/log
CoViAR_MODEL=../pytorch-coviar/out/ylimed_finetuning01/weights

CUDA_VISIBLE_DEVICES=0,1,2,3 \
python train.py --arch resnet101 --data-name ylimed \
    --data-root  $ROOT \
    --train-list $TrainSplit \
    --test-list  $PosValSplit \
    --representation mv \
    --model-prefix $MODEL/ylimed \
    --lr      0.005 \
    --lstm_lr 0.005 \
    --batch-size 45 \
    --lr-steps 80 120 \
    --epochs 160 \
    --gpus 0 1 > $LOG/ylimed_mv_model.out 2>&1 &
# Note: 1和>之间需要空格

CUDA_VISIBLE_DEVICES=2,3 \
python train.py --arch resnet101 --data-name ylimed \
    --data-root  $ROOT \
    --train-list $TrainSplit \
    --test-list  $PosValSplit \
    --representation residual \
    --model-prefix $MODEL/ylimed \
    --lr      0.001 \
    --lstm_lr 0.001 \
    --batch-size 45 \
    --lr-steps 80 110 \
    --epochs 130 \
    --gpus 0 1 > $LOG/ylimed_residual_model.out 2>&1 &

CUDA_VISIBLE_DEVICES=3 \
python test.py \
    --gpus 0 \
    --arch resnet101 --data-name ylimed --representation mv \
    --data-root $ROOT \
    --test-list $TestSplit \
    --weights $MODEL/ylimed_mv_model_best.pth.tar \
    --save-scores $SCORE/ylimed_best_mv_model__scores \
    > $OUT/ylimed_best_mv_model__scores.out 2>&1 &

CUDA_VISIBLE_DEVICES=3 \
python test.py \
    --gpus 0 \
    --arch resnet101 --data-name ylimed --representation residual \
    --data-root $ROOT \
    --test-list $TestSplit \
    --weights $MODEL/ylimed_residual_model_best.pth.tar \
    --save-scores $SCORE/ylimed_best_residual_model__scores \
    > $OUT/ylimed_best_residual_model__scores.out 2>&1 &
